const { resolve } = require('path')

const Router = require('koa-router')
const router = new Router()

const { MANAGE_BASEROUTER } = require(resolve(__dirname, '../config/default'))

const { verifyToken } = require(resolve(__dirname, '../middleware/index'))

const {
  praise,
  findPraise,
  findPraiseNum
} = require(resolve(__dirname, '../routerHandle/managementHandle/praise'))


// 查询点赞 /api/manage
router.get(MANAGE_BASEROUTER + '/praise/find', findPraise)

// 查询点赞数量 /api/manage
router.get(MANAGE_BASEROUTER + '/praise/find/num', findPraiseNum)

// 点赞 /api/manage
router.post(MANAGE_BASEROUTER + '/praise', praise)

module.exports = router